package com.minelx.serverandclient.stream;

public class BytesIndexer extends Indexer {

	private final byte[] source;

	public BytesIndexer(byte[] source) {
		this.source = source;
	}

	@Override
	protected int index(int fromSourceAt, int howMany, byte[] dest) {
		System.arraycopy(source, fromSourceAt, dest, 0, howMany);
		return howMany;
	}

	@Override
	protected int totalLength() {
		return source.length;
	}
}
